layui.laydate.render({
    elem: '#date',
    trigger: 'click',
});

function changeData() {
    var gender = $("input[name='gender']:checked").val();
    if (gender==1){
        $("#genderCn").val("男士");
    }
    else if (gender==2){
        $("#genderCn").val("女士");
    }
    var district_1=$("select[name='district_1']").find('option:selected');
    var district_2=$("select[name='district_2']").find('option:selected');
    var district_3=$("select[name='district_3']").find('option:selected');
    $("#district").val(district_1.val()+"."+district_2.val()+"."+district_3.val());
    $("#districtCn").val(
        (district_1.text()=="请选择"?"":district_1.text())
        +"."+
        (district_2.text()=="请选择"?"":district_2.text())
        +"."+
        (district_3.text()=="请选择"?"":district_3.text())
    );
    var heightCn=$("select[name='heightCn']").find('option:selected').val();
    $("#height").val(heightCn);
    var income=$("select[name='income']").find('option:selected').text();
    $("#incomeCn").val(income);
    var education=$("select[name='education']").find('option:selected').text();
    $("#educationCn").val(education);
    var marriage=$("select[name='marriage']").find('option:selected').text();
    $("#marriageCn").val(marriage);

    var children=$("select[name='children']").find('option:selected').text();
    $("#childrenCn").val(children);
    var constellation=$("select[name='constellation']").find('option:selected').text();
    $("#constellationCn").val(constellation);
    var zodiac=$("select[name='zodiac']").find('option:selected').text();
    $("#zodiacCn").val(zodiac);
    var blood=$("select[name='blood']").find('option:selected').text();
    $("#bloodCn").val(blood);
    var weightCn=$("select[name='weightCn']").find('option:selected').val();
    $("#weight").val(weightCn);
    var marry=$("select[name='marry']").find('option:selected').text();
    $("#marryCn").val(marry);
    var nationality=$("select[name='nationality']").find('option:selected').text();
    $("#nationalityCn").val(nationality);
    var disposition=$("select[name='disposition']").find('option:selected').text();
    $("#dispositionCn").val(disposition);
    var house=$("select[name='house']").find('option:selected').text();
    $("#houseCn").val(house);
    var car=$("select[name='car']").find('option:selected').text();
    $("#carCn").val(car);
    var industry=$("select[name='industry']").find('option:selected').text();
    $("#industryCn").val(industry);
    var profession=$("select[name='profession']").find('option:selected').text();
    $("#professionCn").val(profession);
    var familyBackg=$("select[name='familyBackg']").find('option:selected').text();
    $("#familyBackgCn").val(familyBackg);

    var native_place_1=$("select[name='native_place_1']").find('option:selected');
    var native_place_2=$("select[name='native_place_2']").find('option:selected');
    var native_place_3=$("select[name='native_place_3']").find('option:selected');
    $("#nativePlace").val(native_place_1.val()+"."+native_place_1.val()+"."+native_place_1.val());
    $("#nativePlaceCn").val(
        (native_place_1.text()=="请选择"?"":native_place_1.text())
        +"."+
        (native_place_2.text()=="请选择"?"":native_place_2.text())
        +"."+
        (native_place_3.text()=="请选择"?"":native_place_3.text())
    );

    var drink=$("select[name='drink']").find('option:selected').text();
    $("#drinkCn").val(drink);
    var smoking=$("select[name='smoking']").find('option:selected').text();
    $("#smokingCn").val(smoking);
    var workOut=$("select[name='workOut']").find('option:selected').text();
    $("#workOutCn").val(workOut);
    var workRest=$("select[name='workRest']").find('option:selected').text();
    $("#workRestCn").val(workRest);
    var pet=$("select[name='pet']").find('option:selected').text();
    $("#petCn").val(pet);
    var religious=$("select[name='religious']").find('option:selected').text();
    $("#religiousCn").val(religious);

    var arrhobbyValue=new Array();
    var arrhobbyText=new Array();
    $("input[name='hobbyName']:checked").each(function (index, item) {
        arrhobbyValue.push($(this).val());
        var title = $(this).attr("title");
        arrhobbyText.push(title);
    });
    $("#hobby").val(arrhobbyValue.join(","));
    $("#hobbyCn").val(arrhobbyText.join(","));
}